<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="https://cdn.staticfile.net/jquery/1.10.2/jquery.min.js">
</script>

<body>
    <img src="https://www.cgs.gov.cn/xwl/sp/yangshi/201708/W020170818304643259101.png" style="max-width: 45%; min-width: 300px; height: auto; display: block; margin: 0 auto;" alt="Example Image" class="clickable-image">
    <img src="../wwwroot/images/f57725ead13e4fe98d208c21f136609c_dawfwafaew.jpg" alt="Example Image" class="clickable-image">
    <img src="../wwwroot/images/ad.jpg"  alt="Example Image" class="clickable-image">
</body>
</html>
<script>
    $(document).ready(function(){
        $('.clickable-image').click(function(){
            // 获取图片的src属性值
            var imageUrl = $(this).attr('src');
            
            // 创建一个临时的输入元素
            var tempInput = $("<input>");
            $("body").append(tempInput);
            
            // 将图片链接复制到输入元素中
            tempInput.val(imageUrl).select();
            
            // 复制链接到剪贴板
            document.execCommand("copy");
            
            // 移除临时输入元素
            tempInput.remove();
            
            // 提示用户链接已复制
            alert("你已经成功复制素材 " + imageUrl);
        });
    });
</script>
